{\rtf1\ansi\ansicpg936\cocoartf1344\cocoasubrtf720
{\fonttbl\f0\fnil\fcharset134 STHeitiSC-Light;\f1\fnil\fcharset0 Menlo-Regular;}
{\colortbl;\red255\green255\blue255;\red217\green11\blue0;\red110\green32\blue13;\red186\green0\blue17;
\red180\green0\blue98;\red77\green0\blue158;\red92\green38\blue153;\red46\green13\blue110;\red68\green137\blue147;
\red0\green11\blue255;\red48\green111\blue121;}
\paperw11900\paperh16840\margl1440\margr1440\vieww20380\viewh8400\viewkind0
\deftab1204
\pard\tx1204\pardeftab1204\pardirnatural

\f0\fs60 \cf2 \CocoaLigature0 \'d7\'d4\'b6\'a8\'d2\'e5
\f1 View
\f0 \'ca\'b5\'c0\'fd\
\
\pard\tx1204\pardeftab1204\pardirnatural

\fs50 \cf0 \'d4\'da
\f1 CustomView.h
\f0 \'d6\'d0
\f1\fs60 \cf2 \

\fs50 \cf3 #import \cf4 <UIKit/UIKit.h>\cf3 \
\cf5 @interface\cf0  CustomView : \cf6 UIView\cf0 \
\cf5 @property\cf0  (\cf5 strong\cf0 ,\cf5 nonatomic\cf0 ) \cf6 UIImageView\cf0  * iView ;\
\cf5 @end\
\

\f0 \cf0 \'d4\'da
\f1 CustomView.m
\f0 \'d6\'d0\

\f1 \cf3 #import \cf4 "CustomView.h"\cf0 \
\cf5 @implementation\cf0  CustomView\
- (\cf5 instancetype\cf0 )initWithFrame:(\cf7 CGRect\cf0 )frame\
\{\
    \cf5 if\cf0  (\cf5 self\cf0  = [\cf5 super\cf0  \cf8 initWithFrame\cf0 :frame])\
    \{\
        \cf9 _iView\cf0  = [[\cf6 UIImageView\cf0  \cf8 alloc\cf0 ] \cf8 initWithFrame\cf0 :\cf8 CGRectMake\cf0 (\cf10 10\cf0 , \cf10 10\cf0 , frame.\cf7 size\cf0 .\cf7 height\cf0 -\cf10 20\cf0 , frame.\cf7 size\cf0 .\cf7 height\cf0 -\cf10 20\cf0 )] ;\
        [\cf5 self\cf0  \cf8 addSubview\cf0 :\cf9 _iView\cf0 ] ;\
        \
        \cf6 UILabel\cf0  * label = [[\cf6 UILabel\cf0  \cf8 alloc\cf0 ] \cf8 initWithFrame\cf0 :\cf8 CGRectMake\cf0 (\cf8 CGRectGetMaxX\cf0 (\cf9 _iView\cf0 .\cf7 frame\cf0 )+\cf10 10\cf0 ,\cf9 _iView\cf0 .\cf7 frame\cf0 .\cf7 origin\cf0 .\cf7 y\cf0  , \cf10 200\cf0 , \cf10 20\cf0 )] ;\
        label.\cf7 text\cf0  = \cf4 @"fadsfas"\cf0  ;\
        [\cf5 self\cf0  \cf8 addSubview\cf0 :label] ;\
    \}\
    \cf5 return\cf0  \cf5 self\cf0  ;\
\}\
\cf5 @end\cf0 \
*****************************\

\f0 \'d4\'da\'c6\'e4\'cb\'fb\'ca\'d3\'cd\'bc\'bf\'d8\'d6\'c6\'c6\'f7\'d6\'d0\'b4\'b4\'bd\'a8\'b2\'a2\'ca\'b9\'d3\'c3\
\'d7\'a2\'d2\'e2\'b0\'fc\'ba\'ac\'cd\'b7\'ce\'c4\'bc\'fe
\f1 \
 	\cf11 CustomView\cf0  * custom = [[\cf11 CustomView\cf0  \cf8 alloc\cf0 ] \cf8 initWithFrame\cf0 :\cf8 CGRectMake\cf0 (\cf10 0\cf0 , \cf10 100\cf0 , \cf5 self\cf0 .\cf7 view\cf0 .\cf7 frame\cf0 .\cf7 size\cf0 .\cf7 width\cf0 , \cf10 200\cf0 )];\
    custom.\cf7 backgroundColor\cf0  = [\cf6 UIColor\cf0  \cf8 yellowColor\cf0 ] ;\
    custom.\cf9 iView\cf0 .\cf7 image\cf0  = [\cf6 UIImage\cf0  \cf8 imageNamed\cf0 :\cf4 @"1"\cf0 ] ;\
    [\cf5 self\cf0 .\cf7 view\cf0  \cf8 addSubview\cf0 :custom] ;\
}